package com.action;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.entity.User;
import com.opensymphony.xwork2.ActionSupport;
import com.service.UserInfoService;

public class UserInfoAction extends ActionSupport{
	
	private static final long serialVersionUID = -523169999352997221L;
	
	private User user;
	
	private List<User> userList;
	
	@Autowired         
	private UserInfoService userInfoService;
	
	public String toUserList(){
		try {
			 userList=userInfoService.getAllUserList();
		} catch (Exception e) {
			e.printStackTrace();
			return "error";
		}
		return "toUserList";
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public List<User> getUserList() {
		return userList;
	}

	public void setUserList(List<User> userList) {
		this.userList = userList;
	}

	
}
